package com.xxx.kjds.serviceImpl;

import com.xxx.kjds.entity.WishGoodsExample;
import com.xxx.kjds.entity.WishGoodsKey;
import com.xxx.kjds.mapper.WishGoodsMapper;
import com.xxx.kjds.service.WishGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WishGoodsServiceImpl implements WishGoodsService {
    @Autowired
    private WishGoodsMapper wishGoodsMapper;

    @Override
    public long countByExample(WishGoodsExample example) {
        return wishGoodsMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(WishGoodsExample example) {
        return wishGoodsMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(WishGoodsKey key) {
        return wishGoodsMapper.deleteByPrimaryKey(key);
    }

    @Override
    public int insert(WishGoodsKey record) {
        return wishGoodsMapper.insert(record);
    }

    @Override
    public int insertSelective(WishGoodsKey record) {
        return wishGoodsMapper.insertSelective(record);
    }

    @Override
    public List<WishGoodsKey> selectByExample(WishGoodsExample example) {
        return wishGoodsMapper.selectByExample(example);
    }

    @Override
    public int updateByExampleSelective(WishGoodsKey record, WishGoodsExample example) {
        return wishGoodsMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(WishGoodsKey record, WishGoodsExample example) {
        return wishGoodsMapper.updateByExample(record, example);
    }

    @Override
    public List<WishGoodsKey> selectByWid(Integer wid) {
        WishGoodsExample WishGoodsExample = new WishGoodsExample();
        WishGoodsExample.Criteria criteria = WishGoodsExample.createCriteria();
        criteria.andWishIdEqualTo(wid);
        return wishGoodsMapper.selectByExample(WishGoodsExample);
    }
}
